<template>
  <van-form>
    <van-cell-group inset>
      <van-field
        v-model="title"
        name="title"
        label="标题"
        placeholder="标题"
        :rules="[{ required: true, message: '请填写标题' }]"
      />
      <van-field
        v-model="body"
        name="body"
        label="内容"
        placeholder="内容"
        :rules="[{ required: true, message: '请填写内容' }]"
      />
    </van-cell-group>
    <div style="margin: 16px">
      <van-button round block type="primary" @click="updateMemo">
        更新
      </van-button>
    </div>
  </van-form>
</template>

<script setup>
import { useMemoEdit } from "@/features/Memo/useMemoEdit";

const { title, body, updateMemo } = useMemoEdit();


</script>
